import request from "@/utils/request";

// 获取权限点列表
export function getPermissionList(params) {
  return request({
    url: "/sys/permission",
    params,
  });
}

// 新增权限
export function addPermission(data) {
  return request({
    url: "/sys/permission",
    method: "POST",
    data,
  });
}

// 编辑权限
export function updataPermission(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: "PUT",
    data,
  });
}

// 获取详情权限
export function getPermission(id) {
  return request({
    url: `/sys/permission/${id}`,
  });
}

// 删除详情权限
export function delPermission(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: "DELETE",
  });
}
